home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / editors / eedraw / src / eep / virtrstr.h < prev   
Encoding:
C/C++ Source or Header  |  1990-09-03  |  2.5 KB  |  82 lines

  1. /*****************************************************************************
  2. * VIRTRSTR.H - implementation of black and white virtual raster device.         *
  3. *                                         *
  4. * This program implements a virtual raster device of any size up to memory   *
  5. * limit.                                     *
  6. *                                         *
  7. * Written by:  Gershon Elber                Ver 1.1, Aug. 1990   *
  8. *****************************************************************************/
  9.  
  10. #ifndef VIRTRSTR_H
  11. #define VIRTRSTR_H
  12.  
  13. #ifndef TRUE
  14. #define TRUE    1
  15. #define FALSE    0
  16. #endif /* TRUE */
  17.  
  18. /******************************************************************************
  19. * The following attributes must be consistent with TC graphics.h:          *
  20. * #define HORIZ_DIR    0                              *
  21. * #define VERT_DIR    1                              *
  22. * enum text_just {                                  *
  23. *    LEFT_TEXT    = 0,                              *
  24. *    CENTER_TEXT    = 1,                              *
  25. *    RIGHT_TEXT    = 2,                              *
  26. *                                          *
  27. *    BOTTOM_TEXT    = 0,                              *
  28. *       CENTER_TEXT    = 1,  already defined above.                  *
  29. *    TOP_TEXT    = 2                              *
  30. * };                                          *
  31. * enum line_widths {    Line widths for get/setlinestyle              *
  32. *    NORM_WIDTH  = 1,                              *
  33. *    THICK_WIDTH = 3,                              *
  34. * };                                          *
  35. ******************************************************************************/
  36.  
  37. typedef enum {
  38.     TEXT_ORIENT_NON  = -1,
  39.     TEXT_ORIENT_HORIZ = 0,
  40.     TEXT_ORIENT_VERT = 1
  41. } TextOrientationType;
  42.  
  43. typedef enum {
  44.     TEXT_X_LEFT    = 0,
  45.     TEXT_X_CENTER  = 1,
  46.     TEXT_X_RIGHT   = 2
  47. } TextHorizJustifyType;
  48.  
  49. typedef enum {
  50.     TEXT_Y_BOTTOM  = 0,
  51.     TEXT_Y_CENTER  = 1,
  52.     TEXT_Y_TOP     = 2
  53. } TextVertJustifyType;
  54.  
  55. typedef enum {
  56.     NORM_WIDTH    = 1,
  57.     THICK_WIDTH    = 3
  58. } TextWidthType;
  59.  
  60. int VirtInit(int x, int y);
  61. void VirtClear(void);
  62. void VirtClose(void);
  63. void VirtMoveTo(int x, int y);
  64. void VirtMoveRelTo(int x, int y);
  65. void VirtLineTo(int x, int y);
  66. void VirtLineRelTo(int x, int y);
  67. void VirtLine(int x1, int y1, int x2, int y2);
  68. void VirtBar(int x1, int y1, int x2, int y2);
  69. void VirtCirc(int x, int y, int r);
  70. void VirtArc(int x, int y, int r, int Angle1, int Angle2);
  71. void VirtSetColor(int Color);
  72. void VirtTextFormat(TextOrientationType Orient, int Scale,
  73.             TextHorizJustifyType XCenter, TextVertJustifyType YCenter);
  74. void VirtText(char *Str);
  75. int VirtTextWidth(char *Str);
  76. int VirtTextHeight(char *Str);
  77. int VirtGetPixel(int x, int y);
  78. void VirtSetPixel(int x, int y);
  79. void VirtGetBlock(int x1, int y1, int x2, int y2, char *Buffer);
  80.  
  81. #endif /* VIRTRSTR_H */
  82.